#ifndef RTSPSERVER_H264VIDEOSOURCE_H
#define RTSPSERVER_H264VIDEOSOURCE_H


#include "FramedSource.hh"
#include "sct/rtspserver/h264streamsource.h"

namespace sct
{

class CH264VideoSource: public FramedSource
{
public:
	CH264VideoSource(UsageEnvironment& env, void * source);

	virtual ~CH264VideoSource();

protected:
	virtual void doGetNextFrame();
	virtual void doStopGettingFrames();

private:
	static void tryToGetNextFrame(void* p);

private:
	CH264StreamSource * mSource;

	int mNumSpsPass;
	double mStartReadTime;
	TaskToken mReadTask;
};

}

#endif
